import pandas as pd

# 读取CSV文件
df = pd.read_csv('CrossBorderAIChallenge/input/platform-policy-compliance/answer_sheet.csv')

# 计算pd_desc列中每个值的字符长度
df['desc_length'] = df['pd_desc'].apply(len)

# 找到字符长度最长的行
max_length_row = df.loc[df['desc_length'].idxmax()]

# 找到字符长度最短的行
min_length_row = df.loc[df['desc_length'].idxmin()]

# 打印结果
print("最长的行数据：")
print(max_length_row)
print("\n最短的行数据：")
print(min_length_row)